<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue中的插槽slot</title>
	</head>
	<body>
		<div id="root">
			<child>
				<div slot='header'>header</div>
				<div>hello</div>
				<div slot='footer'>footer</div>
			</child>
		</div>
		
		<script src="js/vue.js"></script>
		<script type="text/javascript">
			
			Vue.component('child',{
				props:['content'],
				template:`<div>
							<slot name="header">
								<h1>头部默认内容</h1>
							</slot>
							<slot>content</slot>
							<slot name="footer">
								<h1>尾部默认内容</h1>
							</slot>
						  </div>`
			})
							
			
			let vm = new Vue({
				el:'#root ',
				
			})
		</script>
	</body>
</html>
